feat(changes): expose RSS feeds for all change views#19516
Conversation
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d95144076
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| defaults={ | ||
| "frequency": subscription.frequency, | ||
| "onetime": subscription.onetime, | ||
| }, |
There was a problem hiding this comment.
Preserve recurring lock subscriptions
When a user already has a regular component-level LockNotification from the notification settings, this update_or_create lookup matches that row and the defaults flip it to onetime=True and instant frequency. In that scenario, clicking the locked-component one-time notification button silently converts their recurring subscription into one that will be deleted after the next lock/unlock event, so future lock notifications stop unexpectedly.
Useful? React with 👍 / 👎.
| description=str(change), | ||
| author_name=change.get_user_display(False), | ||
| pubdate=change.timestamp, | ||
| unique_id=link, |
There was a problem hiding this comment.
Use per-change GUIDs in RSS items
For multiple changes that point to the same unit/component, change.get_absolute_url() returns the same object URL for each change, so these RSS entries all get the same GUID. Many feed readers use GUIDs for de-duplication, which means later changes to the same string can be suppressed even though they are distinct feed items; the GUID should include the change identity rather than just the target URL.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
This PR adds a new RSS endpoint for the changes browser so users can subscribe to any changes view (including arbitrary filters and scoped paths), addressing #7518. It also improves subscription/unsubscribe plumbing to support a better UX on locked component pages.
Changes:
- Add
/changes/rss/(and scoped/changes/rss/<path>/) rendering RSS for the same filtered/scoped queryset as the changes browser. - Update the changes list UI to link to the RSS endpoint while preserving the active query string.
- Add an unsubscribe-capable “unlock notification” button for locked components (plus supporting model/view/template-tag changes and tests).
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| weblate/urls.py | Adds URL routes for the new filtered changes RSS view. |
| weblate/trans/views/changes.py | Implements ChangesRSSView and refactors URL/title helpers for changes views. |
| weblate/trans/tests/test_changes.py | Adds coverage for RSS output, filtering, and scoped RSS paths. |
| weblate/templates/trans/change_list.html | Ensures the RSS link includes the active filter query string. |
| docs/api.rst | Documents the new /changes/rss/ endpoints and supported filters. |
| docs/changes.rst | Notes the new filtered RSS capability in the release notes. |
| weblate/templates/snippets/component/lock.html | Adds unsubscribe/subscribe toggle UI for lock notifications. |
| weblate/accounts/templatetags/subscriptions.py | Adds a template tag to locate an active lock subscription’s unsubscribe URL. |
| weblate/accounts/views.py | Makes “subscribe” idempotent via update_or_create; uses signed IDs for unsubscribe. |
| weblate/accounts/models.py | Centralizes signing/unsigning + unsubscribe URL generation on Subscription. |
| weblate/accounts/notifications.py | Reuses Subscription.get_unsubscribe_url() when rendering notification contexts. |
| weblate/accounts/tests/test_views.py | Updates unsubscribe tests to use the new signed-id helpers. |
| weblate/trans/tests/test_lock.py | Adds coverage for subscribe/unsubscribe behavior on locked component pages. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This allows users to follow any changes search, not only these few predefined views. Fixes WeblateOrg#7518
This allows users to follow any changes search, not only these few predefined views.
Fixes #7518